#include <iostream>
using namespace std;

int main()
{
    char current_letter;
    int space_count = 0, endl_count = 0, other_count = 0;
    while (cin.get(current_letter))
    {
        if (current_letter == '#')
        {
            cout << space_count << ' ' << endl_count << ' ' << other_count;
            break;
        }
        else
        {
            if (current_letter == ' ')
            {
                space_count++;
            }
            else if (current_letter == '\n')
            {
                endl_count++;
            }
            else
            {
                other_count++;
            }
        }
    }
    return 0;
}